package com.xiaoqi.springboot.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author Rookie Coder
 * @Description
 * @Date
 **/
//@Controller
@RestController
public class UserController {

    @RequestMapping("/RestFul/springboot/{id}/{name}")
    public Map<String,Object> restFul(
            @PathVariable("id")Integer id,
            @PathVariable("name")String name
    ){
        Map<String,Object> map = new HashMap<>();
        map.put("id",id);
        map.put("name",name);
        return map;
    }
}
